Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Xiaomi Airfresh VA2 support #360

Merged
merged 5 commits into from
Aug 12, 2018
Merged

Conversation

syssi
Copy link
Collaborator

@syssi syssi commented Aug 10, 2018

miio/airfresh.py Outdated
@@ -0,0 +1,293 @@
import enum
import logging
import re

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

're' imported but unused

@coveralls
Copy link

coveralls commented Aug 10, 2018

Coverage Status

Coverage increased (+0.8%) to 69.952% when pulling 9b467c8 on syssi:feature/zhimi-airfresh into 2b6b068 on rytilahti:master.

Copy link
Owner

@rytilahti rytilahti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, added a couple of questions but feel free to merge when you are ready.

miio/airfresh.py Outdated
try:
return LedBrightness(self.data["led_level"])
except ValueError:
return None
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be a good idea to log the error here?

@property
def child_lock(self) -> bool:
"""Return True if child lock is on."""
return self.data["child_lock"] == "on"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this and the other properties also be protected against None?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This property is always available and doesn't need to be safeguarded.

@syssi syssi merged commit 3578693 into rytilahti:master Aug 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants